package com.ljd.music.service.impl;

import com.ljd.music.dao.ListSongMapper;
import com.ljd.music.pojo.ListSong;
import com.ljd.music.pojo.Song;
import com.ljd.music.service.ListSongService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ListSongServiceImpl implements ListSongService {

    @Autowired
    private ListSongMapper listSongMapper;

    @Override
    public boolean insert(ListSong listSong) {
        return listSongMapper.insert(listSong) > 0;
    }

    @Override
    public List<Song> selectAll(Integer songListId) {
        return listSongMapper.allListSong(songListId);
    }
}
